import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login'
import Index from '@/views/index'
import Home from '@/views/second/home'
import TaskBusines from '@/views/second/TaskBusines'
import TaskOperation from '@/views/second/TaskOperation'
Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/login', component: Login },
    {
      path: '/',
      component: Index,
      redirect: 'home',
      children: [
        { path: 'home', component: Home },
        { path: 'task/business', component: TaskBusines },
        { path: 'task/operation', component: TaskOperation }
      ]
    }
  ]
})

export default router
